$("#form-user-resetPwd").validate({
	rules : {
		oldPassword : {
			required : true,
			remote : {
				type : "post",
				url : ctx + "admin/user/checkPassword",
				data : {
					oldPassword : function() {
						return algorithmRequestParam($("#oldPassword").val());
					}
				}
			}
		},
		password : {
			required : true,
			minlength : 6,
			maxlength : 20
		},
		confirm : {
			required : true,
			equalTo : "#password"
		}
	},
	messages : {
		oldPassword : {
			required : "请输入原密码",
			remote : "原密码错误"
		},
		password : {
			required : "请输入新密码",
			minlength : "密码不能小于6个字符",
			maxlength : "密码不能大于20个字符"
		},
		confirm : {
			required : "请再次输入新密码",
			equalTo : "两次密码输入不一致"
		}

	},
	focusCleanup : true
});

function submitHandler() {
	if ($.validate.form()) {
		$('#oldPassword').val(algorithmRequestParam($("#oldPassword").val()))
		$('#password').val(algorithmRequestParam($("#password").val()))
		$('#confirm').val(algorithmRequestParam($("#confirm").val()))
		$.operate.save(ctx + "admin/user/modifyPwd", $('#form-user-resetPwd').serialize());
	}
}